<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setAttribute("basePath", basePath);

String outPatientVisitInfoJson= (String)request.getAttribute("outPatientVisitInfoJson");
String success= (String)request.getAttribute("success");
%>
<link href="${basePath}/static/css/Pigeonhole/Pigeonhole_list.css"
	rel="stylesheet" type="text/css">
<link rel="stylesheet"
	href="${basePath}/static/css/medicalRecord_Search/medicalSearch.css" />
<script type="text/javascript"
	src="${basePath}/static/publics/assets/jqPaginator/jqPaginator.js"></script>
	<script type="text/javascript" src="${basePath}assets/js/echarts.js"></script>
<div class="list_NR">
	<div class="loc">
		<h3>统计报告</h3>
		<ul class="loc_loc">疾病顺位前20
		</ul>
	</div>

	<div class="list_con_table">
	
	<form id="infoListForm">
<table style="cellpadding="0" cellspacing="0" id="table">
<tbody>
	
	<tr>
		<td colspan="6" style="text-align:right;">
			<input type="button" value="导出" class="btn"  onclick="exportDiagTop20Word()"/>
			 <input type="button" value="保存" class="btn"  onclick="saveDiagTop20()"/>
		</td>
	</tr>
	
	  <tr>
				<td class="tdLabel_7 ">全院总数</td>
				<td class="tdLabel_8">
					<input type="text" class="input_box"  value="${diagTop20OrderInfo.totalOutNum}"    title='' />
				</td>
				<td class="tdLabel_7">前20总数</td>
				<td class="tdLabel_8">
					<input type="text"  class="input_box" value="${diagTop20OrderInfo.top20TotalOutNum}" />	
				</td>
				<td class="tdLabel_7">前20占比</td>
				<td class="tdLabel_8">
					<input type="text" class="input_box"  value="${diagTop20OrderInfo.top20TotalOutNumRate}" />
				</td>
				
				</tr>

			
			<tr>
			   <td class="tdLabel_7">文本</td>
				<td class="tdLabel_8" colspan="8">
					<textarea style="width:95%;height:150px" id="top20OrderText">${diagTop20OrderInfo.top20OrderText}</textarea>
				</td>
			</tr>
			
			<tr>
			   <td class="tdLabel_7">说明</td>
				<td class="tdLabel_8" colspan="8">
					<textarea style="width:95%;height:150px" id="top20OrderNote">${diagTop20OrderInfo.top20OrderNote}</textarea>
				</td>
			</tr>
			
			
			<tr>
			 
			
				<td class="tdLabel_8" colspan="6" style="width:780px">
					<div style="height:auto;">
							<table style=" margin:0 auto; float:left; border-collapse:collapse;" cellpadding="0" cellspacing="0">
		
							<thead>
							<tr>
								<td colspan="8" style="text-align:center;font-size:16px;">
									${statisticalReportParam.statics1Name}出院患者疾病诊治顺位
								</td>
							</tr>
				
							<tr>
								<td class="tdLabel_4" width="8%">顺位</td> 
								<td class="tdLabel_4" width="10%">编码</td> 
								<td class="tdLabel_4" width="15%">名称</td>
								<td class="tdLabel_4" width="10%">数量</td>
								<td class="tdLabel_4" width="10%">构成比</td>
								<td class="tdLabel_4" width="10%">死亡例数</td>
								<td class="tdLabel_4" width="10%">平均住院天数</td>
								<td class="tdLabel_4" width="15%">人均住院费用</td>
								
							</tr>
							</thead>
							<tbody >
				              <c:forEach var="diagTop"   items="${diagTop20OrderInfo.top20diagOrderRecords}">
								<tr>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.topOrder}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagCode}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagName}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNum}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNumRate}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.deathNum}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgInHospDays}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgCostFee}"/></td>
					           </tr>
                              </c:forEach>
							</tbody>
							</table>
						</div>
				</td>
			</tr>
			
			
			<tr>
			 
			
				<td class="tdLabel_8" colspan="6" style="width:780px">
					<div style="height:auto;">
							<table style=" margin:0 auto; float:left; border-collapse:collapse;" cellpadding="0" cellspacing="0">
		
							<thead>
							<tr>
								<td colspan="8" style="text-align:center;font-size:16px;">
									${statisticalReportParam.statics2Name}出院患者疾病诊治顺位
								</td>
							</tr>
				
							<tr>
								<td class="tdLabel_4" width="8%">顺位</td> 
								<td class="tdLabel_4" width="10%">编码</td> 
								<td class="tdLabel_4" width="15%">名称</td>
								<td class="tdLabel_4" width="10%">数量</td>
								<td class="tdLabel_4" width="10%">构成比</td>
								<td class="tdLabel_4" width="10%">死亡例数</td>
								<td class="tdLabel_4" width="10%">平均住院天数</td>
								<td class="tdLabel_4" width="15%">人均住院费用</td>
								
							</tr>
							</thead>
							<tbody >
				              <c:forEach var="diagTop"   items="${diagTop20OrderInfo.preMonthtop20diagOrderRecords}">
								<tr>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.topOrder}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagCode}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagName}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNum}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNumRate}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.deathNum}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgInHospDays}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgCostFee}"/></td>
					           </tr>
                              </c:forEach>
							</tbody>
							</table>
						</div>
				</td>
			</tr>
			
			
			<tr>
			 
			
				<td class="tdLabel_8" colspan="6" style="width:780px">
					<div style="height:auto;">
							<table style=" margin:0 auto; float:left; border-collapse:collapse;" cellpadding="0" cellspacing="0">
		
							<thead>
							<tr>
								<td colspan="8" style="text-align:center;font-size:16px;">
									${statisticalReportParam.statics3Name}出院患者疾病诊治顺位
								</td>
							</tr>
				
							<tr>
								<td class="tdLabel_4" width="8%">顺位</td> 
								<td class="tdLabel_4" width="10%">编码</td> 
								<td class="tdLabel_4" width="15%">名称</td>
								<td class="tdLabel_4" width="10%">数量</td>
								<td class="tdLabel_4" width="10%">构成比</td>
								<td class="tdLabel_4" width="10%">死亡例数</td>
								<td class="tdLabel_4" width="10%">平均住院天数</td>
								<td class="tdLabel_4" width="15%">人均住院费用</td>
								
							</tr>
							</thead>
							<tbody >
				              <c:forEach var="diagTop"   items="${diagTop20OrderInfo.lastYeartop20diagOrderRecords}">
								<tr>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.topOrder}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagCode}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagName}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNum}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.diagNumRate}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.deathNum}"/></td> 
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgInHospDays}"/></td>
								<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value="${diagTop.avgCostFee}"/></td>
					           </tr>
                              </c:forEach>
							</tbody>
							</table>
						</div>
				</td>
			</tr>
			
			
			
			
		
			

			
		</tbody>
</table>
	
</form>
</div>
</div>
	





<script>

//导出word文件
function  exportDiagTop20Word (){
    var month = $("#month").val();
	 window.location.href ="${basePath}/report/exportDiagTop20Word?month="+month;
}

//保存
function saveDiagTop20(){
   var month = $("#month").val();
   var top20OrderText = $("#top20OrderText").val();
   var top20OrderNote = $("#top20OrderNote").val();
   $.ajax({
       type:"post",
       url:"${basePath}/report/saveDiagTop20",
       data:{month:month,top20OrderText:top20OrderText,top20OrderNote:top20OrderNote},
       success:function(data){
       	if(data.success){
       			layer.alert(data.msg,{icon:1});
      			return;
      		}else{
      			layer.alert(data.msg,{icon:1});
      		    return;
      		}
       }
   })
	

}



</script>